Skip to content

gh-152433: Windows: _winapi.c implement GetVersion() UWP alternative#152694

Open
thexai wants to merge 1 commit into
python:mainfrom
thexai:uwp-getversion
Open

gh-152433: Windows: _winapi.c implement GetVersion() UWP alternative#152694
thexai wants to merge 1 commit into
python:mainfrom
thexai:uwp-getversion

Conversation

@thexai

@thexai thexai commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Windows: _winapi.c implement GetVersion() UWP alternative.

@chris-eibl chris-eibl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I hardly think this will have any user on XBOX, though, and even on Desktop the main usage was for subprocess to check whether we're on Win9x

cpython/Lib/subprocess.py

Lines 1030 to 1033 in 23bba4c

if (_winapi.GetVersion() >= 0x80000000 or
os.path.basename(comspec).lower() == "command.com"):
# Win9x, or using command.com on NT. We need to
# use the w9xpopen intermediate program. For more

which has been ripped out a while ago. IOW, it is not used in the Python codebase itself anymore (but there might be users out there, even though starting with an underscore and GetVersion "lying" at you when running in compatibility / manifested mode).

@chris-eibl
chris-eibl requested a review from a team July 19, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants